package com.ruoyi.web.controller.system;

import com.ruoyi.common.annotation.Anonymous;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.service.IIdleAffiliateIncomeStatisticsService;

/**
 * 闲鱼联盟收入统计Controller
 * 
 * @author ruoyi
 */
@RestController
@RequestMapping("/system/income/statistics")
public class IdleAffiliateIncomeStatisticsController extends BaseController
{
    @Autowired
    private IIdleAffiliateIncomeStatisticsService incomeStatisticsService;

    /**
     * 获取CPA和CPS收入汇总统计信息
     */
    @Anonymous
    @GetMapping("/combined")
    public AjaxResult getCombinedStatistics()
    {
        return success(incomeStatisticsService.getCombinedIncomeStatistics());
    }
} 